<?php

/**
 * Louder Cache
 *
 * LICENSE
 *
 * This source file is subject to the New BSD License that is bundled
 * with this package in the file docs/LICENSE.txt.
 *
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to info@loudertechnology.com so we can send you a copy immediately.
 *
 * @category Louder
 * @package Autoloader
 * @copyright Copyright (c) 2005-2009 Andres Felipe Gutierrez (gutierrezandresfelipe at gmail.com)
 * @license New BSD License
 */

/**
 * Class to autoload
 *
 * @category Louder
 * @package Autoloader
 * @copyright Copyright (c) 2005-2009 Andres Felipe Gutierrez (gutierrezandresfelipe at gmail.com)
 * @license New BSD License
 * @param string $className
 */
function Autoload($className){

	$classPath = array(
		'CacheMode' => 'CacheMode/CacheMode',
		'CacheConfiguration' => 'CacheConfiguration/CacheConfiguration',
		'CacheFactory' => 'CacheFactory/CacheFactory',
		'CacheFactoryException' => 'CacheFactory/Exception',
		'CacheReference' => 'CacheReference/CacheReference',
		'CacheReferenceException' => 'CacheReference/Exception',
		'CacheNode' => 'CacheNode/CacheNode',
		'CacheServer' => 'CacheServer/CacheServer',
		'CacheStorage' => 'CacheStorage/CacheStorage',
		'CacheStorageException' => 'CacheStorage/Exception',
		'ConfigReader' => 'ConfigReader/ConfigReader',
		'ConfigReaderException' => 'ConfigReader/Exception',
		'IsolationLevel' => 'IsolationLevel/IsolationLevel',
		'FullyQualifiedName' => 'FullyQualifiedName/FullyQualifiedName',
	);

	if(isset($classPath[$className])){
		require "Library/Louder/".$classPath[$className].".php";
	}
}